<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss2">
    <title>详情</title>
</head>
<style>
    .layui-input-line-width{
        width: 290px !important;
    }
</style>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">
        <a lay-href="/online/service/group/list.action">在线客服分组></a>
        <zmn th:text="${obj.groupId > 0 ? '修改' : '新增'}">新增/修改</zmn>
    </blockquote>

    <div class="layui-card">
        <div th:replace="online/service/group/_tab::tab"></div>

        <div class="layui-card-body">
            <form method="post" action="" class="layui-form" lay-filter="zmn-form">
                <input type="hidden" name="groupId" th:value="${obj.groupId}">

                <div class="layui-split">&nbsp;</div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">对接系统：</label>
                    <div class="layui-input-inline" style="width:192px">
                        <select lay-filter="sysId" id="sysId" name="sysId" lay-search lay-verify="required">
                            <option value="" th:selected="${0 == obj.sysId}">-选择-</option>
                            <option th:each="sys:${sysList}" th:value="${sys.code}" th:selected="${sys.code == obj.sysId}" th:text="${sys.name}"/>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">平台:</label>
                    <div id="plat" class="layui-input-inline">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">子公司:</label>
                    <div id="subCompanyId" class="layui-input-inline">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">分组名称：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input placeholder="30字内" type="text" name="groupName" th:value="${obj.groupName}" lay-verify="required" autocomplete="off" class="layui-input" maxlength="30"/>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">客服组ID：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input placeholder="请输入数字" onkeyup="value=value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" type="text" name="serviceGroupId" th:value="${obj.serviceGroupId}" lay-verify="required" autocomplete="off" class="layui-input" maxlength="20"/>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">是否默认:</label>
                    <div class="layui-input-inline">
                        <input type="radio" name="defaultType" value="2" title="是"
                               th:checked="${obj.defaultType == 2}">
                        <input style="margin-left: 30px" type="radio" name="defaultType" value="1" title="否" th:checked="${obj.defaultType == 1 || obj.defaultType == null }">
                    </div>
                    <div style="margin-left: -50px" class="layui-form-mid layui-word-aux">当无满足条件的客服组时，默认对接该客服组，一个系统+一个子公司最多可设置1个默认客服组</div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">状态:</label>
                    <div class="layui-input-inline">
                        <input type="radio" name="status" value="2" title="启用" th:checked="${obj.status == 2}">
                        <input type="radio" name="status" value="1" title="停用"
                               th:checked="${obj.status == 1 || obj.groupId == null}">
                    </div>
                </div>

                <div class="layui-split">&nbsp;</div>
                <div class="layui-split">&nbsp;</div>
                <div class="layui-split">&nbsp;</div>

                <div class="layui-form-item submit">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary"
                                onclick="layui.admin.events.closeThisTabs();">取消
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script type="text/javascript" th:inline="javascript">
    var json = {
        obj: [[${obj}]]
    };

    layui.config({
        version: 20200518,
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        online_service_group_detail_edit_js: "online/service/group/zmn.plat.online.service.group.detail.edit",
    }).use(['index', 'online_service_group_detail_edit_js']);
</script>
</body>
</html>